package src.thread;

public class PriorityDemo {
        public static void main(String[] args) {
                Thread max=new Thread(){
                        public void run(){
                                for (int i = 1; i <10000 ; i++) {
                                        System.out.println("max");
                                }
                        }
                };
                Thread min=new Thread(){
                        public void run(){
                                for (int i = 1; i <10000 ; i++) {
                                        System.out.println("min");
                                }
                        }
                };
                Thread norm=new Thread(){
                        public void run(){
                                for (int i = 1; i <10000 ; i++) {
                                        System.out.println("norm");
                                }
                        }
                };
                min.setPriority(Thread.MIN_PRIORITY);
                max.setPriority(Thread.MAX_PRIORITY);
                norm.setPriority(Thread.NORM_PRIORITY);
                min.start();
                max.start();
                norm.start();
        }
}
